package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.TicketPayPassword;
import cn.wolfcode.trip.base.mapper.TicketPayPasswordMapper;
import cn.wolfcode.trip.base.service.ITicketPayPasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TicketPayPasswordServiceImpl implements ITicketPayPasswordService {
    @Autowired
    private TicketPayPasswordMapper ticketPayPasswordMapper;


    @Override
    public void save(TicketPayPassword ticketPayPassword) {
        ticketPayPasswordMapper.insert(ticketPayPassword);
    }

    @Override
    public void delete(Long id) {
        ticketPayPasswordMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<TicketPayPassword> selectAll() {
        return ticketPayPasswordMapper.selectAll();
    }

    @Override
    public void update(TicketPayPassword ticketPayPassword) {
        ticketPayPasswordMapper.updateByPrimaryKey(ticketPayPassword);
    }

    @Override
    public TicketPayPassword get(Long id) {
        return ticketPayPasswordMapper.selectByPrimaryKey(id);
    }

    @Override
    public TicketPayPassword selectByIdAndPass(Long userId, String passdata) {
        return ticketPayPasswordMapper.selectByIdAndPass(userId,passdata);
    }
}
